#coding=utf-8

import sys
# 列出下面的方法属怿
# print dir(sys)


# 查看帮助
# help("keywords")
# 查看import关键字如何使甿
# help("import")
# 查看模块的使甿
# help("os.path")
# 查看list如何使用
# help("list")
# 查看字符串中find方法使用
# help("str.find")
# 查看内置函数如何使用
# # help("open")
# class user :
#     test=True
#     test1=True
#     pass
# u=user()
# print dir(u)
# help("keywords")
# # 字符串数字之间转捿
# print type(int("6"))
# print type(str(6))
#
#
# 字符串长度方泿
# foo = 'abc'
# print len(foo)


# open()打开文件操作
# poem="让我们一起学习Python＿444"
# f=open('D:/test/part-r-00001','a') # open for 'w'riting
# f.write(poem.decode('utf-8').encode('gbk')) # write text to file
# f.close() # close the file
# #
#
# range() 丿组数孿
# print range(10)
# print range(1,10,3)
# for i in range(10):
#     print i
#
foo = 'abc'
for i in range(len(foo)):
    # %d,用来输出十进制整敿
    print foo[i], '(%d)' % i

#
# # # enumerate()
aDict = {}
alist=[]

# # aDict['port'] = 80
# # for i, key in enumerate(aDict):
# #     print i, key, aDict[key]
# #
# #
# # # type()获得对象类型
print type(aDict)
print isinstance(6, int)
print isinstance(aDict, dict)
print isinstance(aDict, list)